package com.feeyo.groundservice.easyphoto.utils.string

/**
 * 字符串工具类
 * Created by huan on 2017/10/20.
 */
object StringUtils {
    @JvmStatic
    fun getLastPathSegment(content: String?): String {
        if (content.isNullOrEmpty()) {
            return ""
        }
        val segments = content.split("/".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
        if (segments.isNotEmpty()) {
            return segments[segments.size - 1]
        }
        return ""
    }
}
